﻿<%@ Page Language="C#" AutoEventWireup="true" EnableEventValidation="false" ValidateRequest="false"
    CodeFile="AddAdmin.aspx.cs" Inherits="Whir_System_Module_Role_AddAdmin" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="../../Js/JSRole.js"></script>

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

</head>
<body onload="toStart();">
    <form id="form1" runat="server">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td height="26" colspan="2" align="left" class="form_title"><strong>管理员帐号管理</strong></td>
            </tr>
            <tr>
                <td width="100px" height="30" align="center" class="form_tdText">登录帐号</td>
                <td align="left" class="form_td">
                    <asp:TextBox ID="txtAdminName" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtAdminName"
                        Display="Dynamic" ErrorMessage="请输入账号"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtAdminName"
                        Display="Dynamic" ErrorMessage="请输入英文字符，不包含数字和下划线！" ValidationExpression="^[A-Za-z]+$"></asp:RegularExpressionValidator><span
                            class="form_desc">账号的格式为英文字符，不包含数字、下划线等。（如 zhangsan）</span></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">管理员姓名</td>
                <td align="left" class="form_td">
                    <asp:TextBox ID="txtAdminTrueName" runat="server"></asp:TextBox>&nbsp;&nbsp;<span
                        class="form_desc">输入管理员的名称，便于记忆</span></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">管理员密码</td>
                <td align="left" class="form_td">
                    <asp:HiddenField ID="hfPwd" runat="server" />
                    <asp:TextBox ID="txtAdminPassword" runat="server" TextMode="Password"></asp:TextBox>
                    <font id="pwd1" runat="server" color="red">〖注：不修改密码请留空〗</font>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtAdminPassword"
                        Display="Dynamic" ErrorMessage="请输入密码"></asp:RequiredFieldValidator></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">确认密码</td>
                <td align="left" class="form_td">
                    <asp:TextBox ID="txtPwd2" runat="server" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtAdminPassword"
                        Display="Dynamic" ErrorMessage="请重新输入密码"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtAdminPassword"
                        ControlToValidate="txtPwd2" Display="Dynamic" ErrorMessage="两次输入的密码不一致"></asp:CompareValidator></td>
            </tr>
            <tr id="trAdmin" runat="server">
                <td align="center" class="form_tdText">角色设置</td>
                <td align="left" class="form_td">
                    <asp:RadioButtonList ID="rblTypeID" runat="server">
                        <asp:ListItem Value="1">超级管理员：拥有所有权限。</asp:ListItem>
                        <asp:ListItem Value="2" Selected="True">普通管理员：需要详细指定每一项角色权限。</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr id="trRole" runat="server">
                <td align="center" class="form_tdText"></td>
                <td align="left" class="form_td">
                    <table border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td>
                                <asp:ListBox ID="lb1" runat="server" Width="250" Height="300" />
                            </td>
                            <td>
                                <table border="0" cellspacing="0" cellpadding="5">
                                    <tr>
                                        <td>
                                            <input name="btnAdd" id="btnAdd" type="submit" value="添加&gt;&gt;" class="btn_default"
                                                onclick="return Add();" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <input name="btnDelete" id="btnDelete" type="submit" value="&lt;&lt;删除" class="btn_default"
                                                onclick="return Delete();" />
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td>
                                <asp:ListBox ID="lb2" runat="server" Width="250" Height="300" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText"></td>
                <td align="left" class="form_td">
                    <asp:Button ID="btnSubmit" runat="server" Text="提交" CssClass="btn_default" OnClick="btnSubmit_Click" />&nbsp;
                    <input id="Reset1" type="button" value="返回" class="btn_default" onclick="javascript:history.back();" />
                    <asp:HiddenField ID="hf2" runat="server" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

<script language="javascript" src="../../Js/common.js"></script>

<script type="text/javascript">initAutoFormStyle();</script>